class Cat:
    def eat(self):
        print(f'{self.name}吃鱼')

    def drink(self):
        print(f'{self.name}喝水')

tom=Cat()

tom.name='tom'

tom.eat()

tom.drink()
